
<div>
	<table id="allRole" lay-filter="allRole" class="layui-table"></table>
</div>
<script type="text/html" id="roleTopTool">
<div class="layui-btn-group roleTopTool">
	<button class="layui-btn layui-btn-sm" lay-event="addRole"> <i class="layui-icon">&#xe654;</i> 添加 </button>
	<button class="layui-btn layui-btn-sm" lay-event="deleteRole"> <i class="layui-icon">&#xe640;</i> 删除 </button>
	<button class="layui-btn layui-btn-sm" lay-event="flushRole"> <i class="layui-icon">&#x1002;</i> 刷新 </button>
</div>
</script>
<script type="text/html" id="roleToolbar">
  <a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon">&#xe642;</i> 编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs {{ d.value == 1 ? 'layui-disabled' : '' }}" lay-event="{{ d.value == 1 ? '' : 'del'}}"><i class="layui-icon">&#xe640;</i> 删除</a>
</script>
<script>
	$(document).ready(function() {
		layui.use([ 'table', 'form', 'layer','formSelects'], function() {
			var table = layui.table;
			var form = layui.form;
			var layer = layui.layer;
			var formSelects = layui.formSelects;
			var roleManager = new RoleManager();
			roleManager.init(table, form, layer,formSelects);
		});
	});
</script>
